<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>条件指令</title>
    <script src="../vue.global.js"></script>
    <style>
        .red{
            color:red;
        }
        .font-big{
            font-size: 50px;
        }
    </style>
</head>
<body>

<div id="App">
    <div v-if="flag">我要显示不</div>
    <div v-else>4040</div>

    <div v-if="type=='A'">A</div>
    <div v-else-if="type=='B'">B</div>
    <div v-else-if="type=='C'">C</div>

    <template v-if="flag">
        <h2>我搞1</h2>
        <h2>我搞2</h2>
        <h2>我搞3</h2>
    </template>

    <div v-show="flag" v-on:click="flag=!flag">show/hide</div>
</div>


<script>



    const App = {

        data(){
            return {
                flag:true,
                type:'C'
            }
        },
        computed:{

        }
    };

    const vm = Vue.createApp(App).mount("#App")


</script>
</body>
</html>